package com.lunesu.bjair;

import java.io.File;
import android.content.ContentProvider;
import android.content.ContentValues;
import android.database.Cursor;
import android.net.Uri;
import android.os.ParcelFileDescriptor;

public class LocalContentProvider extends ContentProvider {

	@Override
	public ParcelFileDescriptor openFile(Uri uri, String mode) throws java.io.FileNotFoundException {
		String path = this.getContext().getFilesDir().getAbsolutePath();
		File file = new File(path, uri.getPath());  
		return ParcelFileDescriptor.open(file, ParcelFileDescriptor.MODE_READ_ONLY);  
	}
	  
	@Override
	public int delete(Uri arg0, String arg1, String[] arg2) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public String getType(Uri uri) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Uri insert(Uri uri, ContentValues values) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public boolean onCreate() {
		return true;
	}

	@Override
	public Cursor query(Uri uri, String[] projection, String selection,
			String[] selectionArgs, String sortOrder) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public int update(Uri uri, ContentValues values, String selection,
			String[] selectionArgs) {
		// TODO Auto-generated method stub
		return 0;
	}

}
